package sales.gz.com.salescounter.utils;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;


import sales.gz.com.salescounter.ui.CommitpayActivity;


/**
 * Created by Administrator on 2016-11-28.
 */

public class ServiceFile extends Service{
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {

        super.onCreate();

        new Thread() {
            @Override
            public void run() {
                super.run();
                while (true) {

                    try {
                        Thread.sleep(120000);
                        // 定时查询未配送是否有新的订单并进行语音提示
                        //CommitpayActivity.get_pay_result();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }.start();
    }
 public void stop(){
     stop();
 }

}
